using System;
using System.ComponentModel;
using System.Data;
using System.Runtime.Serialization;
namespace DataAccess
{
    /// <summary>
    /// A custom serializable dataset containing SIG_ACCION information.
    /// </summary>
    [Serializable]
    [DesignerCategory("code")]
    public class SigAccionData : DataTable
    {
        ///
        /// Constants for table and fields mapping
        ///
        public const String SIG_ACCION_TABLE = "SIG_ACCION";
        public const String ACC_ID_FIELD = "ACC_ID";
        public const String PLN_ID_FIELD = "PLN_ID";
        public const String TPA_ID_FIELD = "TPA_ID";
        public const String TPC_ID_FIELD = "TPC_ID";
        public const String FUN_ID_FIELD = "FUN_ID";
        public const String ACC_DESCRIPCION_FIELD = "ACC_DESCRIPCION";
        public const String ACC_VALOR_FIELD = "ACC_VALOR";
        public const String ACC_CONV_VIG_ACTUAL_FIELD = "ACC_CONV_VIG_ACTUAL";
        public const String ACC_CONV_VIG_ANTERIOR_FIELD = "ACC_CONV_VIG_ANTERIOR";
        public const String ACC_OTROS_RECURSOS_FIELD = "ACC_OTROS_RECURSOS";
        public const String ACC_FECHA_REALIZACION_FIELD = "ACC_FECHA_REALIZACION";
        public const String ACTI_COD_FIELD = "ACTI_COD";
        public const String PLN_VALOR_APROPIACION_FIELD = "PLN_VALOR_APROPIACION";
        public const String TOTAL_ACC_VALOR_FIELD = "TOTAL_ACC_VALOR";
        public const String TOTAL_FAE_VALOR_EPE_FIELD = "TOTAL_FAE_VALOR_EPE";
        public const String ACC_ESTADO_FIELD = "ACC_ESTADO";
        public const String MOTIVO_MODIFICACION_FIELD = "ACC_MOTIVO_MODIFICACION";
        public const String SAC_ID_FIELD = "SAC_ID";
        public const String ACTIVIDAD_FIELD = "ACTIVIDAD";
        public const String SAS_ID_FIELD = "SAS_ID";
        


        public SigAccionData()
		{
			BuildDataTables();
		}
        protected SigAccionData(SerializationInfo info, StreamingContext context)
		{
			//
		}
        /// <summary>
		/// 
		/// </summary>
		private void BuildDataTables()
		{
            Columns.Add(ACC_ID_FIELD, typeof(Decimal));
            Columns.Add(PLN_ID_FIELD, typeof(Decimal));
            Columns[PLN_ID_FIELD].Caption = "Rubro";
            Columns.Add(TPA_ID_FIELD, typeof(Decimal));
            Columns[TPA_ID_FIELD].Caption = "TPA_ID_FIELD";
            Columns.Add(TPC_ID_FIELD, typeof(String));
            Columns[TPC_ID_FIELD].Caption = "TPC_ID_FIELD";
            Columns.Add(FUN_ID_FIELD, typeof(Decimal));
            Columns[FUN_ID_FIELD].Caption = "TPC_ID_FIELD";
            Columns.Add(ACC_DESCRIPCION_FIELD, typeof(String));
            Columns[ACC_DESCRIPCION_FIELD].Caption = "Descripcion";
            Columns.Add(ACC_VALOR_FIELD, typeof(Decimal));
            Columns[ACC_VALOR_FIELD].Caption = "Valor";
            Columns.Add(ACC_CONV_VIG_ACTUAL_FIELD, typeof(Decimal));
            Columns[ACC_CONV_VIG_ACTUAL_FIELD].Caption = "Vigencia Actual";
            Columns.Add(ACC_CONV_VIG_ANTERIOR_FIELD, typeof(Decimal));
            Columns[ACC_CONV_VIG_ANTERIOR_FIELD].Caption = "Vigencia Anterior";
            Columns.Add(ACC_OTROS_RECURSOS_FIELD, typeof(Decimal));
            Columns[ACC_OTROS_RECURSOS_FIELD].Caption = "Otros Recursos";
            Columns.Add(ACC_FECHA_REALIZACION_FIELD, typeof(String));
            Columns[ACC_FECHA_REALIZACION_FIELD].Caption = "Fecha Realizacion";
            Columns.Add(ACTI_COD_FIELD, typeof(Decimal));
            Columns[ACTI_COD_FIELD].Caption = "ACTI_COD_FIELD";
            Columns.Add(PLN_VALOR_APROPIACION_FIELD, typeof(Decimal));
            //Columns[PLN_VALOR_APROPIACION_FIELD].Caption = "Valor Apropiacion";
            Columns.Add(TOTAL_FAE_VALOR_EPE_FIELD, typeof(Decimal));
            //Columns[PLN_VALOR_APROPIACION_FIELD].Caption = "Valor Apropiacion";
            Columns.Add(TOTAL_ACC_VALOR_FIELD, typeof(Decimal));
            Columns[TOTAL_ACC_VALOR_FIELD].Caption = "Valor valor";
            Columns.Add(MOTIVO_MODIFICACION_FIELD, typeof(String));
            Columns[MOTIVO_MODIFICACION_FIELD].Caption = "Motivo_Modificacion";

        
            Columns.Add(SAC_ID_FIELD, typeof(Decimal));
            Columns[SAC_ID_FIELD].Caption = "SUB_ACTIVIDAD";

            Columns.Add(ACTIVIDAD_FIELD, typeof(String));
            Columns.Add(ACC_ESTADO_FIELD, typeof(String));

            Columns.Add(SAS_ID_FIELD, typeof(Decimal));
            Columns[SAS_ID_FIELD].Caption = "Actividad";
            
            
            TableName = SIG_ACCION_TABLE;
		}

        /// <summary>
        /// 
        /// </summary>
        /// <param name="row"></param>
        public void Add(DataRow row)
        {
            Rows.Add(row);
        }
    }
}
